let ids = lib.eachId(args);
if(ids && ids.length > 0){
    lib.dbUpdate(`UPDATE receipt_product 
SET product_good_num = low_quality,
no_qc_num = 0,
low_quality = 0,
qc_status = 4
WHERE
	parent_receipt = ? 
	AND del_flag = 0`,ids[0]);
    lib.dbUpdate(`UPDATE quality_check_storage qcs
LEFT JOIN receipt_product rp ON rp.id = qcs.receipt_product_id
LEFT JOIN receipt r ON r.id = rp.parent_receipt 
SET qcs.product_good_num = rp.product_good_num 
WHERE
	r.id = ? 
	AND qcs.del_flag = 0 
	AND rp.del_flag = 0 
	AND r.del_flag = 0`,ids[0]);
}
1